<?php
class Pageley_Util_TimestampTests extends Pageley_Test_Case {

	public function testParse() {
		$date = Pageley_Util_Timestamp::parse("2007-01-01 12:00:00");
		$this->assertEquals(1167649200000, $date->getTime());
	}

	public function testFormat() {
		$date = new Pageley_Util_Timestamp(1167649200000);
		$formatted = $date->format();
		$this->assertEquals("2007-01-01 12:00:00", $formatted);
		$formatted = $date->format("jS \of F Y H:i");
		$this->assertEquals("1st of January 2007 12:00", $formatted);
	}
}
